package com.springboot.satoken.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.springboot.satoken.entity.User;
import com.springboot.satoken.mapper.UserMapper;
import com.springboot.satoken.service.UserService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/*
 *DATE:2025/8/1
 */
@Service
public class UserServiceImpl implements UserService {

    @Resource
    private UserMapper userMapper;
    @Override
    public User checkLogin(String username, String password) {
        QueryWrapper<User> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("username", username).eq("password", password);
        return userMapper.selectOne(queryWrapper);
    }
}
